Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / ui / tab_dialogs.cc
blob64c656935377739f1582fccc99cce3a3734a060c
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/tab_dialogs.h"
6 #include "content/public/browser/web_contents.h"
8 namespace {
9 int kUserDataKey; // The value is not important, the address is a key.
12 // static
13 TabDialogs* TabDialogs::FromWebContents(content::WebContents* contents) {
14 DCHECK(contents);
15 return static_cast<TabDialogs*>(contents->GetUserData(UserDataKey()));
18 // static
19 const void* TabDialogs::UserDataKey() {
20 return &kUserDataKey;