| OLD | NEW |
| 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/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" | 55 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" |
| 56 #include "chrome/browser/ui/views/password_generation_bubble_view.h" | 56 #include "chrome/browser/ui/views/password_generation_bubble_view.h" |
| 57 #include "chrome/browser/ui/views/status_bubble_views.h" | 57 #include "chrome/browser/ui/views/status_bubble_views.h" |
| 58 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h" | 58 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h" |
| 59 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 59 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 60 #include "chrome/browser/ui/views/toolbar_view.h" | 60 #include "chrome/browser/ui/views/toolbar_view.h" |
| 61 #include "chrome/browser/ui/views/update_recommended_message_box.h" | 61 #include "chrome/browser/ui/views/update_recommended_message_box.h" |
| 62 #include "chrome/browser/ui/webui/feedback_ui.h" | 62 #include "chrome/browser/ui/webui/feedback_ui.h" |
| 63 #include "chrome/browser/ui/webui/task_manager/task_manager_dialog.h" | 63 #include "chrome/browser/ui/webui/task_manager/task_manager_dialog.h" |
| 64 #include "chrome/browser/ui/window_sizer.h" | 64 #include "chrome/browser/ui/window_sizer.h" |
| 65 #include "chrome/browser/website_settings.h" |
| 65 #include "chrome/common/chrome_notification_types.h" | 66 #include "chrome/common/chrome_notification_types.h" |
| 66 #include "chrome/common/chrome_switches.h" | 67 #include "chrome/common/chrome_switches.h" |
| 67 #include "chrome/common/extensions/extension_resource.h" | 68 #include "chrome/common/extensions/extension_resource.h" |
| 68 #include "chrome/common/pref_names.h" | 69 #include "chrome/common/pref_names.h" |
| 69 #include "chrome/common/url_constants.h" | 70 #include "chrome/common/url_constants.h" |
| 70 #include "content/public/browser/download_manager.h" | 71 #include "content/public/browser/download_manager.h" |
| 71 #include "content/public/browser/notification_service.h" | 72 #include "content/public/browser/notification_service.h" |
| 72 #include "content/public/browser/render_view_host.h" | 73 #include "content/public/browser/render_view_host.h" |
| 73 #include "content/public/browser/user_metrics.h" | 74 #include "content/public/browser/user_metrics.h" |
| 74 #include "content/public/browser/web_contents.h" | 75 #include "content/public/browser/web_contents.h" |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 bool show_history) { | 1123 bool show_history) { |
| 1123 browser::ShowPageInfoBubble(GetLocationBarView()->location_icon_view(), | 1124 browser::ShowPageInfoBubble(GetLocationBarView()->location_icon_view(), |
| 1124 profile, url, ssl, show_history); | 1125 profile, url, ssl, show_history); |
| 1125 } | 1126 } |
| 1126 | 1127 |
| 1127 void BrowserView::ShowWebsiteSettings(Profile* profile, | 1128 void BrowserView::ShowWebsiteSettings(Profile* profile, |
| 1128 TabContentsWrapper* tab_contents_wrapper, | 1129 TabContentsWrapper* tab_contents_wrapper, |
| 1129 const GURL& url, | 1130 const GURL& url, |
| 1130 const content::SSLStatus& ssl, | 1131 const content::SSLStatus& ssl, |
| 1131 bool show_history) { | 1132 bool show_history) { |
| 1133 WebsiteSettings::Show(GetLocationBarView()->location_icon_view(), profile, |
| 1134 tab_contents_wrapper, url, ssl); |
| 1132 } | 1135 } |
| 1133 | 1136 |
| 1134 void BrowserView::ShowAppMenu() { | 1137 void BrowserView::ShowAppMenu() { |
| 1135 toolbar_->app_menu()->Activate(); | 1138 toolbar_->app_menu()->Activate(); |
| 1136 } | 1139 } |
| 1137 | 1140 |
| 1138 bool BrowserView::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 1141 bool BrowserView::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
| 1139 bool* is_keyboard_shortcut) { | 1142 bool* is_keyboard_shortcut) { |
| 1140 if (event.type != WebKit::WebInputEvent::RawKeyDown) | 1143 if (event.type != WebKit::WebInputEvent::RawKeyDown) |
| 1141 return false; | 1144 return false; |
| (...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2387 return; | 2390 return; |
| 2388 | 2391 |
| 2389 PasswordGenerationBubbleView* bubble = | 2392 PasswordGenerationBubbleView* bubble = |
| 2390 new PasswordGenerationBubbleView(bounds, | 2393 new PasswordGenerationBubbleView(bounds, |
| 2391 this, | 2394 this, |
| 2392 web_contents->GetRenderViewHost()); | 2395 web_contents->GetRenderViewHost()); |
| 2393 views::BubbleDelegateView::CreateBubble(bubble); | 2396 views::BubbleDelegateView::CreateBubble(bubble); |
| 2394 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | 2397 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); |
| 2395 bubble->Show(); | 2398 bubble->Show(); |
| 2396 } | 2399 } |
| OLD | NEW |