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

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

Issue 10538039: Renamed BrowserWindow::GetNativeHandle() to GetNativeWindow() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update copyrights Created 8 years, 6 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/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 window_->Activate(); 149 window_->Activate();
150 } 150 }
151 #else 151 #else
152 void ExtensionDialog::InitWindowFullscreen() { 152 void ExtensionDialog::InitWindowFullscreen() {
153 NOTIMPLEMENTED(); 153 NOTIMPLEMENTED();
154 } 154 }
155 #endif 155 #endif
156 156
157 157
158 void ExtensionDialog::InitWindow(Browser* browser, int width, int height) { 158 void ExtensionDialog::InitWindow(Browser* browser, int width, int height) {
159 gfx::NativeWindow parent = browser->window()->GetNativeHandle(); 159 gfx::NativeWindow parent = browser->window()->GetNativeWindow();
160 window_ = views::Widget::CreateWindowWithParent(this, parent); 160 window_ = views::Widget::CreateWindowWithParent(this, parent);
161 161
162 // Center the window over the browser. 162 // Center the window over the browser.
163 gfx::Point center = browser->window()->GetBounds().CenterPoint(); 163 gfx::Point center = browser->window()->GetBounds().CenterPoint();
164 int x = center.x() - width / 2; 164 int x = center.x() - width / 2;
165 int y = center.y() - height / 2; 165 int y = center.y() - height / 2;
166 window_->SetBounds(gfx::Rect(x, y, width, height)); 166 window_->SetBounds(gfx::Rect(x, y, width, height));
167 167
168 window_->Show(); 168 window_->Show();
169 // TODO(jamescook): Remove redundant call to Activate()? 169 // TODO(jamescook): Remove redundant call to Activate()?
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 if (content::Details<ExtensionHost>(host()) != details) 262 if (content::Details<ExtensionHost>(host()) != details)
263 return; 263 return;
264 if (observer_) 264 if (observer_)
265 observer_->ExtensionTerminated(this); 265 observer_->ExtensionTerminated(this);
266 break; 266 break;
267 default: 267 default:
268 NOTREACHED() << L"Received unexpected notification"; 268 NOTREACHED() << L"Received unexpected notification";
269 break; 269 break;
270 } 270 }
271 } 271 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698