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

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

Issue 1251633002: Add BubbleManager to manage bubbles and ChromeBubbleManager for events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Work in Progress Created 5 years, 5 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
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/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 // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 #include "chrome/common/pref_names.h" 148 #include "chrome/common/pref_names.h"
149 #include "chrome/common/profiling.h" 149 #include "chrome/common/profiling.h"
150 #include "chrome/common/search_types.h" 150 #include "chrome/common/search_types.h"
151 #include "chrome/common/url_constants.h" 151 #include "chrome/common/url_constants.h"
152 #include "chrome/grit/chromium_strings.h" 152 #include "chrome/grit/chromium_strings.h"
153 #include "chrome/grit/generated_resources.h" 153 #include "chrome/grit/generated_resources.h"
154 #include "chrome/grit/locale_settings.h" 154 #include "chrome/grit/locale_settings.h"
155 #include "components/app_modal/javascript_dialog_manager.h" 155 #include "components/app_modal/javascript_dialog_manager.h"
156 #include "components/bookmarks/browser/bookmark_model.h" 156 #include "components/bookmarks/browser/bookmark_model.h"
157 #include "components/bookmarks/browser/bookmark_utils.h" 157 #include "components/bookmarks/browser/bookmark_utils.h"
158 #include "components/bubble/bubble_controller.h"
please use gerrit instead 2015/07/22 00:09:36 Isn't this an implementation detail of the manager
159 #include "components/bubble/bubble_manager.h"
158 #include "components/content_settings/core/browser/host_content_settings_map.h" 160 #include "components/content_settings/core/browser/host_content_settings_map.h"
159 #include "components/favicon/content/content_favicon_driver.h" 161 #include "components/favicon/content/content_favicon_driver.h"
160 #include "components/history/core/browser/top_sites.h" 162 #include "components/history/core/browser/top_sites.h"
161 #include "components/infobars/core/simple_alert_infobar_delegate.h" 163 #include "components/infobars/core/simple_alert_infobar_delegate.h"
162 #include "components/search/search.h" 164 #include "components/search/search.h"
163 #include "components/sessions/session_types.h" 165 #include "components/sessions/session_types.h"
164 #include "components/startup_metric_utils/startup_metric_utils.h" 166 #include "components/startup_metric_utils/startup_metric_utils.h"
165 #include "components/translate/core/browser/language_state.h" 167 #include "components/translate/core/browser/language_state.h"
166 #include "components/ui/zoom/zoom_controller.h" 168 #include "components/ui/zoom/zoom_controller.h"
167 #include "components/web_modal/popup_manager.h" 169 #include "components/web_modal/popup_manager.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 }; 336 };
335 337
336 /////////////////////////////////////////////////////////////////////////////// 338 ///////////////////////////////////////////////////////////////////////////////
337 // Browser, Constructors, Creation, Showing: 339 // Browser, Constructors, Creation, Showing:
338 340
339 Browser::Browser(const CreateParams& params) 341 Browser::Browser(const CreateParams& params)
340 : extension_registry_observer_(this), 342 : extension_registry_observer_(this),
341 type_(params.type), 343 type_(params.type),
342 profile_(params.profile), 344 profile_(params.profile),
343 window_(NULL), 345 window_(NULL),
346 bubble_manager_(
347 new BubbleManager(base::Bind(&BubbleController::Create))),
please use gerrit instead 2015/07/22 00:09:36 Why parameterize creation? I think we can use Bubb
344 tab_strip_model_delegate_(new chrome::BrowserTabStripModelDelegate(this)), 348 tab_strip_model_delegate_(new chrome::BrowserTabStripModelDelegate(this)),
345 tab_strip_model_( 349 tab_strip_model_(
346 new TabStripModel(tab_strip_model_delegate_.get(), params.profile)), 350 new TabStripModel(tab_strip_model_delegate_.get(), params.profile)),
347 app_name_(params.app_name), 351 app_name_(params.app_name),
348 is_trusted_source_(params.trusted_source), 352 is_trusted_source_(params.trusted_source),
349 cancel_download_confirmation_state_(NOT_PROMPTED), 353 cancel_download_confirmation_state_(NOT_PROMPTED),
350 override_bounds_(params.initial_bounds), 354 override_bounds_(params.initial_bounds),
351 initial_show_state_(params.initial_show_state), 355 initial_show_state_(params.initial_show_state),
352 is_session_restore_(params.is_session_restore), 356 is_session_restore_(params.is_session_restore),
353 host_desktop_type_( 357 host_desktop_type_(
(...skipping 2296 matching lines...) Expand 10 before | Expand all | Expand 10 after
2650 if (contents && !allow_js_access) { 2654 if (contents && !allow_js_access) {
2651 contents->web_contents()->GetController().LoadURL( 2655 contents->web_contents()->GetController().LoadURL(
2652 target_url, 2656 target_url,
2653 content::Referrer(), 2657 content::Referrer(),
2654 ui::PAGE_TRANSITION_LINK, 2658 ui::PAGE_TRANSITION_LINK,
2655 std::string()); // No extra headers. 2659 std::string()); // No extra headers.
2656 } 2660 }
2657 2661
2658 return contents != NULL; 2662 return contents != NULL;
2659 } 2663 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698