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

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: Kill views_bubble_controller 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_manager.h"
158 #include "components/content_settings/core/browser/host_content_settings_map.h" 159 #include "components/content_settings/core/browser/host_content_settings_map.h"
159 #include "components/favicon/content/content_favicon_driver.h" 160 #include "components/favicon/content/content_favicon_driver.h"
160 #include "components/history/core/browser/top_sites.h" 161 #include "components/history/core/browser/top_sites.h"
161 #include "components/infobars/core/simple_alert_infobar_delegate.h" 162 #include "components/infobars/core/simple_alert_infobar_delegate.h"
162 #include "components/search/search.h" 163 #include "components/search/search.h"
163 #include "components/sessions/session_types.h" 164 #include "components/sessions/session_types.h"
164 #include "components/startup_metric_utils/startup_metric_utils.h" 165 #include "components/startup_metric_utils/startup_metric_utils.h"
165 #include "components/translate/core/browser/language_state.h" 166 #include "components/translate/core/browser/language_state.h"
166 #include "components/ui/zoom/zoom_controller.h" 167 #include "components/ui/zoom/zoom_controller.h"
167 #include "components/web_modal/popup_manager.h" 168 #include "components/web_modal/popup_manager.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 }; 335 };
335 336
336 /////////////////////////////////////////////////////////////////////////////// 337 ///////////////////////////////////////////////////////////////////////////////
337 // Browser, Constructors, Creation, Showing: 338 // Browser, Constructors, Creation, Showing:
338 339
339 Browser::Browser(const CreateParams& params) 340 Browser::Browser(const CreateParams& params)
340 : extension_registry_observer_(this), 341 : extension_registry_observer_(this),
341 type_(params.type), 342 type_(params.type),
342 profile_(params.profile), 343 profile_(params.profile),
343 window_(NULL), 344 window_(NULL),
345 bubble_manager_(new BubbleManager()),
344 tab_strip_model_delegate_(new chrome::BrowserTabStripModelDelegate(this)), 346 tab_strip_model_delegate_(new chrome::BrowserTabStripModelDelegate(this)),
345 tab_strip_model_( 347 tab_strip_model_(
346 new TabStripModel(tab_strip_model_delegate_.get(), params.profile)), 348 new TabStripModel(tab_strip_model_delegate_.get(), params.profile)),
347 app_name_(params.app_name), 349 app_name_(params.app_name),
348 is_trusted_source_(params.trusted_source), 350 is_trusted_source_(params.trusted_source),
349 cancel_download_confirmation_state_(NOT_PROMPTED), 351 cancel_download_confirmation_state_(NOT_PROMPTED),
350 override_bounds_(params.initial_bounds), 352 override_bounds_(params.initial_bounds),
351 initial_show_state_(params.initial_show_state), 353 initial_show_state_(params.initial_show_state),
352 is_session_restore_(params.is_session_restore), 354 is_session_restore_(params.is_session_restore),
353 host_desktop_type_( 355 host_desktop_type_(
(...skipping 2296 matching lines...) Expand 10 before | Expand all | Expand 10 after
2650 if (contents && !allow_js_access) { 2652 if (contents && !allow_js_access) {
2651 contents->web_contents()->GetController().LoadURL( 2653 contents->web_contents()->GetController().LoadURL(
2652 target_url, 2654 target_url,
2653 content::Referrer(), 2655 content::Referrer(),
2654 ui::PAGE_TRANSITION_LINK, 2656 ui::PAGE_TRANSITION_LINK,
2655 std::string()); // No extra headers. 2657 std::string()); // No extra headers.
2656 } 2658 }
2657 2659
2658 return contents != NULL; 2660 return contents != NULL;
2659 } 2661 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698