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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 10214001: WebDialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_dialogs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after
1453 WindowOpenDisposition disposition, 1453 WindowOpenDisposition disposition,
1454 const gfx::Rect& initial_pos, 1454 const gfx::Rect& initial_pos,
1455 bool user_gesture) { 1455 bool user_gesture) {
1456 AddNewContents(NULL, new_contents, disposition, initial_pos, user_gesture); 1456 AddNewContents(NULL, new_contents, disposition, initial_pos, user_gesture);
1457 } 1457 }
1458 1458
1459 void Browser::CloseTabContents(WebContents* contents) { 1459 void Browser::CloseTabContents(WebContents* contents) {
1460 CloseContents(contents); 1460 CloseContents(contents);
1461 } 1461 }
1462 1462
1463 gfx::NativeWindow Browser::BrowserShowHtmlDialog( 1463 gfx::NativeWindow Browser::BrowserShowWebDialog(
1464 HtmlDialogUIDelegate* delegate, 1464 WebDialogDelegate* delegate,
1465 gfx::NativeWindow parent_window, 1465 gfx::NativeWindow parent_window,
1466 DialogStyle style) { 1466 DialogStyle style) {
1467 if (!parent_window) 1467 if (!parent_window)
1468 parent_window = window_->GetNativeHandle(); 1468 parent_window = window_->GetNativeHandle();
1469 1469
1470 return browser::ShowHtmlDialog(parent_window, 1470 return browser::ShowWebDialog(parent_window,
1471 profile_, 1471 profile_,
1472 this, 1472 this,
1473 delegate, 1473 delegate,
1474 style); 1474 style);
1475 } 1475 }
1476 1476
1477 void Browser::BrowserRenderWidgetShowing() { 1477 void Browser::BrowserRenderWidgetShowing() {
1478 RenderWidgetShowing(); 1478 RenderWidgetShowing();
1479 } 1479 }
1480 1480
1481 void Browser::BookmarkBarSizeChanged(bool is_animating) { 1481 void Browser::BookmarkBarSizeChanged(bool is_animating) {
1482 window_->ToolbarSizeChanged(is_animating); 1482 window_->ToolbarSizeChanged(is_animating);
1483 } 1483 }
1484 1484
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
2101 void Browser::OpenTaskManager(bool highlight_background_resources) { 2101 void Browser::OpenTaskManager(bool highlight_background_resources) {
2102 content::RecordAction(UserMetricsAction("TaskManager")); 2102 content::RecordAction(UserMetricsAction("TaskManager"));
2103 if (highlight_background_resources) 2103 if (highlight_background_resources)
2104 window_->ShowBackgroundPages(); 2104 window_->ShowBackgroundPages();
2105 else 2105 else
2106 window_->ShowTaskManager(); 2106 window_->ShowTaskManager();
2107 } 2107 }
2108 2108
2109 void Browser::OpenFeedbackDialog() { 2109 void Browser::OpenFeedbackDialog() {
2110 content::RecordAction(UserMetricsAction("Feedback")); 2110 content::RecordAction(UserMetricsAction("Feedback"));
2111 browser::ShowHtmlFeedbackView(this, std::string(), std::string()); 2111 browser::ShowWebFeedbackView(this, std::string(), std::string());
2112 } 2112 }
2113 2113
2114 void Browser::ToggleBookmarkBar() { 2114 void Browser::ToggleBookmarkBar() {
2115 content::RecordAction(UserMetricsAction("ShowBookmarksBar")); 2115 content::RecordAction(UserMetricsAction("ShowBookmarksBar"));
2116 window_->ToggleBookmarkBar(); 2116 window_->ToggleBookmarkBar();
2117 } 2117 }
2118 2118
2119 void Browser::OpenBookmarkManager() { 2119 void Browser::OpenBookmarkManager() {
2120 content::RecordAction(UserMetricsAction("ShowBookmarkManager")); 2120 content::RecordAction(UserMetricsAction("ShowBookmarkManager"));
2121 content::RecordAction(UserMetricsAction("ShowBookmarks")); 2121 content::RecordAction(UserMetricsAction("ShowBookmarks"));
(...skipping 3378 matching lines...) Expand 10 before | Expand all | Expand 10 after
5500 if (contents && !allow_js_access) { 5500 if (contents && !allow_js_access) {
5501 contents->web_contents()->GetController().LoadURL( 5501 contents->web_contents()->GetController().LoadURL(
5502 target_url, 5502 target_url,
5503 content::Referrer(), 5503 content::Referrer(),
5504 content::PAGE_TRANSITION_LINK, 5504 content::PAGE_TRANSITION_LINK,
5505 std::string()); // No extra headers. 5505 std::string()); // No extra headers.
5506 } 5506 }
5507 5507
5508 return contents != NULL; 5508 return contents != NULL;
5509 } 5509 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_dialogs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698