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

Side by Side Diff: chrome/browser/chromeos/login/simple_web_view_dialog.cc

Issue 10413061: Make PageInfoBubble not use BrowserList::GetLastActive and instead obtain a navigator at creation t… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/chromeos/login/simple_web_view_dialog.h" 5 #include "chrome/browser/chromeos/login/simple_web_view_dialog.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 247 }
248 248
249 void SimpleWebViewDialog::NavigationStateChanged( 249 void SimpleWebViewDialog::NavigationStateChanged(
250 const WebContents* source, unsigned changed_flags) { 250 const WebContents* source, unsigned changed_flags) {
251 if (location_bar_) { 251 if (location_bar_) {
252 location_bar_->Update(NULL); 252 location_bar_->Update(NULL);
253 UpdateButtons(); 253 UpdateButtons();
254 } 254 }
255 } 255 }
256 256
257 content::WebContents* SimpleWebViewDialog::OpenURL(
258 const content::OpenURLParams& params) {
259 // As there are no Browsers right now, this could not actually ever work.
260 NOTIMPLEMENTED();
261 return NULL;
262 }
263
257 void SimpleWebViewDialog::LoadingStateChanged(WebContents* source) { 264 void SimpleWebViewDialog::LoadingStateChanged(WebContents* source) {
258 bool is_loading = source->IsLoading(); 265 bool is_loading = source->IsLoading();
259 UpdateReload(is_loading, false); 266 UpdateReload(is_loading, false);
260 command_updater_->UpdateCommandEnabled(IDC_STOP, is_loading); 267 command_updater_->UpdateCommandEnabled(IDC_STOP, is_loading);
261 } 268 }
262 269
263 TabContentsWrapper* SimpleWebViewDialog::GetTabContentsWrapper() const { 270 TabContentsWrapper* SimpleWebViewDialog::GetTabContentsWrapper() const {
264 return NULL; 271 return NULL;
265 } 272 }
266 273
(...skipping 12 matching lines...) Expand all
279 } 286 }
280 287
281 void SimpleWebViewDialog::ShowPageInfo(content::WebContents* web_contents, 288 void SimpleWebViewDialog::ShowPageInfo(content::WebContents* web_contents,
282 const GURL& url, 289 const GURL& url,
283 const content::SSLStatus& ssl, 290 const content::SSLStatus& ssl,
284 bool show_history) { 291 bool show_history) {
285 PageInfoBubbleView* page_info_bubble = 292 PageInfoBubbleView* page_info_bubble =
286 new PageInfoBubbleView( 293 new PageInfoBubbleView(
287 location_bar_->location_icon_view(), 294 location_bar_->location_icon_view(),
288 location_bar_->profile(), 295 location_bar_->profile(),
289 url, ssl, true); 296 url, ssl,
297 true,
298 this);
290 page_info_bubble->set_parent_window( 299 page_info_bubble->set_parent_window(
291 ash::Shell::GetInstance()->GetContainer( 300 ash::Shell::GetInstance()->GetContainer(
292 ash::internal::kShellWindowId_LockSystemModalContainer)); 301 ash::internal::kShellWindowId_LockSystemModalContainer));
293 CreateViewsBubble(page_info_bubble); 302 CreateViewsBubble(page_info_bubble);
294 page_info_bubble->Show(); 303 page_info_bubble->Show();
295 } 304 }
296 305
297 PageActionImageView* SimpleWebViewDialog::CreatePageActionImageView( 306 PageActionImageView* SimpleWebViewDialog::CreatePageActionImageView(
298 LocationBarView* owner, 307 LocationBarView* owner,
299 ExtensionAction* action) { 308 ExtensionAction* action) {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 396
388 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) { 397 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) {
389 if (reload_) { 398 if (reload_) {
390 reload_->ChangeMode( 399 reload_->ChangeMode(
391 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, 400 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD,
392 force); 401 force);
393 } 402 }
394 } 403 }
395 404
396 } // namespace chromeos 405 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/simple_web_view_dialog.h ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698