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

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

Issue 10692170: Aura desktop: Show resize cursors again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 8 years, 5 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/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/base_window.h" 10 #include "chrome/browser/ui/base_window.h"
11 #include "chrome/browser/ui/views/extensions/extension_dialog_observer.h" 11 #include "chrome/browser/ui/views/extensions/extension_dialog_observer.h"
12 #include "chrome/common/chrome_notification_types.h" 12 #include "chrome/common/chrome_notification_types.h"
13 #include "content/public/browser/notification_details.h" 13 #include "content/public/browser/notification_details.h"
14 #include "content/public/browser/notification_source.h" 14 #include "content/public/browser/notification_source.h"
15 #include "content/public/browser/render_view_host.h" 15 #include "content/public/browser/render_view_host.h"
16 #include "content/public/browser/render_widget_host_view.h" 16 #include "content/public/browser/render_widget_host_view.h"
17 #include "content/public/browser/web_contents.h" 17 #include "content/public/browser/web_contents.h"
18 #include "googleurl/src/gurl.h" 18 #include "googleurl/src/gurl.h"
19 #include "ui/gfx/screen.h" 19 #include "ui/gfx/screen.h"
20 #include "ui/views/background.h" 20 #include "ui/views/background.h"
21 #include "ui/views/widget/widget.h" 21 #include "ui/views/widget/widget.h"
22 22
23 #if defined(USE_AURA) 23 #if defined(USE_ASH)
24 #include "ash/shell.h" 24 #include "ash/shell.h"
25 #include "ui/aura/root_window.h" 25 #include "ui/aura/root_window.h"
26 #endif 26 #endif
27 27
28 using content::WebContents; 28 using content::WebContents;
29 29
30 ExtensionDialog::ExtensionDialog(ExtensionHost* host, 30 ExtensionDialog::ExtensionDialog(ExtensionHost* host,
31 ExtensionDialogObserver* observer) 31 ExtensionDialogObserver* observer)
32 : window_(NULL), 32 : window_(NULL),
33 extension_host_(host), 33 extension_host_(host),
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 Profile* profile) { 116 Profile* profile) {
117 DCHECK(profile); 117 DCHECK(profile);
118 ExtensionProcessManager* manager = profile->GetExtensionProcessManager(); 118 ExtensionProcessManager* manager = profile->GetExtensionProcessManager();
119 119
120 DCHECK(manager); 120 DCHECK(manager);
121 if (!manager) 121 if (!manager)
122 return NULL; 122 return NULL;
123 return manager->CreateDialogHost(url); 123 return manager->CreateDialogHost(url);
124 } 124 }
125 125
126 #if defined(USE_AURA) 126 #if defined(USE_ASH)
127 void ExtensionDialog::InitWindowFullscreen() { 127 void ExtensionDialog::InitWindowFullscreen() {
128 aura::RootWindow* root_window = ash::Shell::GetPrimaryRootWindow(); 128 aura::RootWindow* root_window = ash::Shell::GetPrimaryRootWindow();
129 gfx::Rect screen_rect = 129 gfx::Rect screen_rect =
130 gfx::Screen::GetDisplayNearestWindow(root_window).bounds(); 130 gfx::Screen::GetDisplayNearestWindow(root_window).bounds();
131 131
132 // We want to be the fullscreen topmost child of the root window. 132 // We want to be the fullscreen topmost child of the root window.
133 window_ = new views::Widget; 133 window_ = new views::Widget;
134 views::Widget::InitParams params( 134 views::Widget::InitParams params(
135 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 135 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
136 params.delegate = this; 136 params.delegate = this;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 if (content::Details<ExtensionHost>(host()) != details) 274 if (content::Details<ExtensionHost>(host()) != details)
275 return; 275 return;
276 if (observer_) 276 if (observer_)
277 observer_->ExtensionTerminated(this); 277 observer_->ExtensionTerminated(this);
278 break; 278 break;
279 default: 279 default:
280 NOTREACHED() << L"Received unexpected notification"; 280 NOTREACHED() << L"Received unexpected notification";
281 break; 281 break;
282 } 282 }
283 } 283 }
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698