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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 1396923003: Autofill: Replace "save credit card" infobar with a bubble (Views only). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: defined(TOOLKIT_VIEWS) -> defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX). Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "chrome/browser/ui/browser_list.h" 52 #include "chrome/browser/ui/browser_list.h"
53 #include "chrome/browser/ui/browser_window_state.h" 53 #include "chrome/browser/ui/browser_window_state.h"
54 #include "chrome/browser/ui/search/search_delegate.h" 54 #include "chrome/browser/ui/search/search_delegate.h"
55 #include "chrome/browser/ui/search/search_model.h" 55 #include "chrome/browser/ui/search/search_model.h"
56 #include "chrome/browser/ui/search/search_ui.h" 56 #include "chrome/browser/ui/search/search_ui.h"
57 #include "chrome/browser/ui/tabs/tab_menu_model.h" 57 #include "chrome/browser/ui/tabs/tab_menu_model.h"
58 #include "chrome/browser/ui/tabs/tab_strip_model.h" 58 #include "chrome/browser/ui/tabs/tab_strip_model.h"
59 #include "chrome/browser/ui/view_ids.h" 59 #include "chrome/browser/ui/view_ids.h"
60 #include "chrome/browser/ui/views/accelerator_table.h" 60 #include "chrome/browser/ui/views/accelerator_table.h"
61 #include "chrome/browser/ui/views/accessibility/invert_bubble_view.h" 61 #include "chrome/browser/ui/views/accessibility/invert_bubble_view.h"
62 #include "chrome/browser/ui/views/autofill/save_card_bubble_views.h"
62 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 63 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
63 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h" 64 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h"
64 #include "chrome/browser/ui/views/browser_dialogs.h" 65 #include "chrome/browser/ui/views/browser_dialogs.h"
65 #include "chrome/browser/ui/views/download/download_in_progress_dialog_view.h" 66 #include "chrome/browser/ui/views/download/download_in_progress_dialog_view.h"
66 #include "chrome/browser/ui/views/download/download_shelf_view.h" 67 #include "chrome/browser/ui/views/download/download_shelf_view.h"
67 #include "chrome/browser/ui/views/exclusive_access_bubble_views.h" 68 #include "chrome/browser/ui/views/exclusive_access_bubble_views.h"
68 #include "chrome/browser/ui/views/extensions/bookmark_app_bubble_view.h" 69 #include "chrome/browser/ui/views/extensions/bookmark_app_bubble_view.h"
69 #include "chrome/browser/ui/views/frame/browser_view_layout.h" 70 #include "chrome/browser/ui/views/frame/browser_view_layout.h"
70 #include "chrome/browser/ui/views/frame/browser_view_layout_delegate.h" 71 #include "chrome/browser/ui/views/frame/browser_view_layout_delegate.h"
71 #include "chrome/browser/ui/views/frame/contents_layout_manager.h" 72 #include "chrome/browser/ui/views/frame/contents_layout_manager.h"
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 delegate.Pass(), browser_->profile(), url, 1270 delegate.Pass(), browser_->profile(), url,
1270 already_bookmarked); 1271 already_bookmarked);
1271 } 1272 }
1272 1273
1273 void BrowserView::ShowBookmarkAppBubble( 1274 void BrowserView::ShowBookmarkAppBubble(
1274 const WebApplicationInfo& web_app_info, 1275 const WebApplicationInfo& web_app_info,
1275 const ShowBookmarkAppBubbleCallback& callback) { 1276 const ShowBookmarkAppBubbleCallback& callback) {
1276 BookmarkAppBubbleView::ShowBubble(GetToolbarView(), web_app_info, callback); 1277 BookmarkAppBubbleView::ShowBubble(GetToolbarView(), web_app_info, callback);
1277 } 1278 }
1278 1279
1280 autofill::SaveCardBubbleView* BrowserView::ShowSaveCreditCardBubble(
1281 content::WebContents* web_contents,
1282 autofill::SaveCardBubbleController* controller) {
1283 autofill::SaveCardBubbleView* view = new autofill::SaveCardBubbleViews(
1284 GetToolbarView()->GetSaveCreditCardBubbleAnchor(), web_contents,
1285 controller);
1286 view->Show();
1287 return view;
1288 }
1289
1279 void BrowserView::ShowTranslateBubble( 1290 void BrowserView::ShowTranslateBubble(
1280 content::WebContents* web_contents, 1291 content::WebContents* web_contents,
1281 translate::TranslateStep step, 1292 translate::TranslateStep step,
1282 translate::TranslateErrors::Type error_type, 1293 translate::TranslateErrors::Type error_type,
1283 bool is_user_gesture) { 1294 bool is_user_gesture) {
1284 if (contents_web_view_->HasFocus() && 1295 if (contents_web_view_->HasFocus() &&
1285 !GetLocationBarView()->IsMouseHovered()) { 1296 !GetLocationBarView()->IsMouseHovered()) {
1286 content::RenderViewHost* rvh = web_contents->GetRenderViewHost(); 1297 content::RenderViewHost* rvh = web_contents->GetRenderViewHost();
1287 if (rvh->IsFocusedElementEditable()) 1298 if (rvh->IsFocusedElementEditable())
1288 return; 1299 return;
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
2630 return immersive_mode_controller()->IsEnabled(); 2641 return immersive_mode_controller()->IsEnabled();
2631 } 2642 }
2632 2643
2633 views::Widget* BrowserView::GetBubbleAssociatedWidget() { 2644 views::Widget* BrowserView::GetBubbleAssociatedWidget() {
2634 return GetWidget(); 2645 return GetWidget();
2635 } 2646 }
2636 2647
2637 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { 2648 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() {
2638 return top_container_->GetBoundsInScreen(); 2649 return top_container_->GetBoundsInScreen();
2639 } 2650 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/location_bar/location_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698