Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: chrome/browser/ui/views/extensions/extension_dialog.cc

Issue 12334073: Remove WebContents methods that duplicate WebContentsView methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/extensions/extension_dialog.h" 5 #include "chrome/browser/ui/views/extensions/extension_dialog.h"
6 6
7 #include "chrome/browser/extensions/extension_host.h" 7 #include "chrome/browser/extensions/extension_host.h"
8 #include "chrome/browser/extensions/extension_process_manager.h" 8 #include "chrome/browser/extensions/extension_process_manager.h"
9 #include "chrome/browser/extensions/extension_system.h" 9 #include "chrome/browser/extensions/extension_system.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/base_window.h" 11 #include "chrome/browser/ui/base_window.h"
12 #include "chrome/browser/ui/views/extensions/extension_dialog_observer.h" 12 #include "chrome/browser/ui/views/extensions/extension_dialog_observer.h"
13 #include "chrome/common/chrome_notification_types.h" 13 #include "chrome/common/chrome_notification_types.h"
14 #include "content/public/browser/notification_details.h" 14 #include "content/public/browser/notification_details.h"
15 #include "content/public/browser/notification_source.h" 15 #include "content/public/browser/notification_source.h"
16 #include "content/public/browser/render_view_host.h" 16 #include "content/public/browser/render_view_host.h"
17 #include "content/public/browser/render_widget_host_view.h" 17 #include "content/public/browser/render_widget_host_view.h"
18 #include "content/public/browser/web_contents.h" 18 #include "content/public/browser/web_contents.h"
19 #include "content/public/browser/web_contents_view.h"
19 #include "googleurl/src/gurl.h" 20 #include "googleurl/src/gurl.h"
20 #include "ui/gfx/screen.h" 21 #include "ui/gfx/screen.h"
21 #include "ui/views/background.h" 22 #include "ui/views/background.h"
22 #include "ui/views/widget/widget.h" 23 #include "ui/views/widget/widget.h"
23 24
24 #if defined(USE_ASH) 25 #if defined(USE_ASH)
25 #include "ash/shell.h" 26 #include "ash/shell.h"
26 #include "ui/aura/root_window.h" 27 #include "ui/aura/root_window.h"
27 #endif 28 #endif
28 29
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 else 103 else
103 dialog->InitWindow(base_window, width, height); 104 dialog->InitWindow(base_window, width, height);
104 105
105 // Show a white background while the extension loads. This is prettier than 106 // Show a white background while the extension loads. This is prettier than
106 // flashing a black unfilled window frame. 107 // flashing a black unfilled window frame.
107 host->view()->set_background( 108 host->view()->set_background(
108 views::Background::CreateSolidBackground(0xFF, 0xFF, 0xFF)); 109 views::Background::CreateSolidBackground(0xFF, 0xFF, 0xFF));
109 host->view()->SetVisible(true); 110 host->view()->SetVisible(true);
110 111
111 // Ensure the DOM JavaScript can respond immediately to keyboard shortcuts. 112 // Ensure the DOM JavaScript can respond immediately to keyboard shortcuts.
112 host->host_contents()->Focus(); 113 host->host_contents()->GetView()->Focus();
113 return dialog; 114 return dialog;
114 } 115 }
115 116
116 // static 117 // static
117 extensions::ExtensionHost* ExtensionDialog::CreateExtensionHost( 118 extensions::ExtensionHost* ExtensionDialog::CreateExtensionHost(
118 const GURL& url, 119 const GURL& url,
119 Profile* profile) { 120 Profile* profile) {
120 DCHECK(profile); 121 DCHECK(profile);
121 ExtensionProcessManager* manager = 122 ExtensionProcessManager* manager =
122 extensions::ExtensionSystem::Get(profile)->process_manager(); 123 extensions::ExtensionSystem::Get(profile)->process_manager();
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 if (content::Details<extensions::ExtensionHost>(host()) != details) 282 if (content::Details<extensions::ExtensionHost>(host()) != details)
282 return; 283 return;
283 if (observer_) 284 if (observer_)
284 observer_->ExtensionTerminated(this); 285 observer_->ExtensionTerminated(this);
285 break; 286 break;
286 default: 287 default:
287 NOTREACHED() << L"Received unexpected notification"; 288 NOTREACHED() << L"Received unexpected notification";
288 break; 289 break;
289 } 290 }
290 } 291 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/dropdown_bar_host_win.cc ('k') | chrome/browser/ui/views/extensions/extension_popup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698