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

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

Issue 9479008: Re-factor location bar/toolbar code to get rid of the browser dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: call right overloaded method Created 8 years, 9 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
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/gtk/location_bar_view_gtk.h" 5 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 14 matching lines...) Expand all
25 #include "chrome/browser/extensions/extension_browser_event_router.h" 25 #include "chrome/browser/extensions/extension_browser_event_router.h"
26 #include "chrome/browser/extensions/extension_service.h" 26 #include "chrome/browser/extensions/extension_service.h"
27 #include "chrome/browser/extensions/extension_tab_util.h" 27 #include "chrome/browser/extensions/extension_tab_util.h"
28 #include "chrome/browser/favicon/favicon_tab_helper.h" 28 #include "chrome/browser/favicon/favicon_tab_helper.h"
29 #include "chrome/browser/instant/instant_controller.h" 29 #include "chrome/browser/instant/instant_controller.h"
30 #include "chrome/browser/profiles/profile.h" 30 #include "chrome/browser/profiles/profile.h"
31 #include "chrome/browser/search_engines/template_url.h" 31 #include "chrome/browser/search_engines/template_url.h"
32 #include "chrome/browser/search_engines/template_url_service.h" 32 #include "chrome/browser/search_engines/template_url_service.h"
33 #include "chrome/browser/search_engines/template_url_service_factory.h" 33 #include "chrome/browser/search_engines/template_url_service_factory.h"
34 #include "chrome/browser/ui/browser.h" 34 #include "chrome/browser/ui/browser.h"
35 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h"
35 #include "chrome/browser/ui/browser_list.h" 36 #include "chrome/browser/ui/browser_list.h"
36 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" 37 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
37 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" 38 #include "chrome/browser/ui/content_settings/content_setting_image_model.h"
38 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h" 39 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h"
39 #include "chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.h" 40 #include "chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.h"
40 #include "chrome/browser/ui/gtk/content_setting_bubble_gtk.h" 41 #include "chrome/browser/ui/gtk/content_setting_bubble_gtk.h"
41 #include "chrome/browser/ui/gtk/extensions/extension_popup_gtk.h" 42 #include "chrome/browser/ui/gtk/extensions/extension_popup_gtk.h"
42 #include "chrome/browser/ui/gtk/first_run_bubble.h" 43 #include "chrome/browser/ui/gtk/first_run_bubble.h"
43 #include "chrome/browser/ui/gtk/gtk_util.h" 44 #include "chrome/browser/ui/gtk/gtk_util.h"
44 #include "chrome/browser/ui/gtk/nine_box.h" 45 #include "chrome/browser/ui/gtk/nine_box.h"
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 1371
1371 gboolean LocationBarViewGtk::ContentSettingImageViewGtk::OnButtonPressed( 1372 gboolean LocationBarViewGtk::ContentSettingImageViewGtk::OnButtonPressed(
1372 GtkWidget* sender, GdkEvent* event) { 1373 GtkWidget* sender, GdkEvent* event) {
1373 TabContentsWrapper* tab_contents = parent_->GetTabContentsWrapper(); 1374 TabContentsWrapper* tab_contents = parent_->GetTabContentsWrapper();
1374 if (!tab_contents) 1375 if (!tab_contents)
1375 return TRUE; 1376 return TRUE;
1376 Profile* profile = parent_->browser()->profile(); 1377 Profile* profile = parent_->browser()->profile();
1377 content_setting_bubble_ = new ContentSettingBubbleGtk( 1378 content_setting_bubble_ = new ContentSettingBubbleGtk(
1378 sender, this, 1379 sender, this,
1379 ContentSettingBubbleModel::CreateContentSettingBubbleModel( 1380 ContentSettingBubbleModel::CreateContentSettingBubbleModel(
1380 parent_->browser(), tab_contents, profile, 1381 parent_->browser()->content_setting_bubble_model_delegate(),
1382 tab_contents,
1383 profile,
1381 content_setting_image_model_->get_content_settings_type()), 1384 content_setting_image_model_->get_content_settings_type()),
1382 profile, tab_contents->web_contents()); 1385 profile, tab_contents->web_contents());
1383 return TRUE; 1386 return TRUE;
1384 } 1387 }
1385 1388
1386 gboolean LocationBarViewGtk::ContentSettingImageViewGtk::OnExpose( 1389 gboolean LocationBarViewGtk::ContentSettingImageViewGtk::OnExpose(
1387 GtkWidget* sender, GdkEventExpose* event) { 1390 GtkWidget* sender, GdkEventExpose* event) {
1388 TRACE_EVENT0("ui::gtk", 1391 TRACE_EVENT0("ui::gtk",
1389 "LocationBarViewGtk::ContentSettingImageViewGtk::OnExpose"); 1392 "LocationBarViewGtk::ContentSettingImageViewGtk::OnExpose");
1390 1393
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1649 std::string badge_text = page_action_->GetBadgeText(tab_id); 1652 std::string badge_text = page_action_->GetBadgeText(tab_id);
1650 if (badge_text.empty()) 1653 if (badge_text.empty())
1651 return FALSE; 1654 return FALSE;
1652 1655
1653 gfx::CanvasSkiaPaint canvas(event, false); 1656 gfx::CanvasSkiaPaint canvas(event, false);
1654 GtkAllocation allocation; 1657 GtkAllocation allocation;
1655 gtk_widget_get_allocation(widget, &allocation); 1658 gtk_widget_get_allocation(widget, &allocation);
1656 page_action_->PaintBadge(&canvas, gfx::Rect(allocation), tab_id); 1659 page_action_->PaintBadge(&canvas, gfx::Rect(allocation), tab_id);
1657 return FALSE; 1660 return FALSE;
1658 } 1661 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/content_settings/content_setting_bubble_model_delegate.h ('k') | chrome/browser/ui/toolbar/toolbar_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698