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

Unified Diff: chrome/browser/ui/views/location_bar/content_setting_image_view.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: win fix Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/location_bar/content_setting_image_view.cc
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
index 0f63d04b61896df798b631a9b1f2bf7ac1290a3a..4de3f74e22c9e14fdd8a5477b773b1fbb48b0336 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/ui/views/content_setting_bubble_contents.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "chrome/browser/ui/views/window.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
#include "third_party/skia/include/core/SkShader.h"
#include "ui/base/animation/slide_animation.h"
@@ -24,6 +25,7 @@
#include "ui/gfx/skia_util.h"
#include "ui/views/border.h"
+using content::NavigationController;
using content::WebContents;
namespace {
@@ -164,10 +166,14 @@ void ContentSettingImageView::OnMouseReleased(const views::MouseEvent& event) {
if (!tab_contents)
return;
- Profile* profile = parent_->browser()->profile();
+ Browser* browser = parent_->FindBrowser();
+ if (!browser)
+ return;
+
+ Profile* profile = browser->profile();
ContentSettingBubbleContents* bubble = new ContentSettingBubbleContents(
ContentSettingBubbleModel::CreateContentSettingBubbleModel(
- parent_->browser(),
+ browser,
tab_contents,
profile,
content_setting_image_model_->get_content_settings_type()),

Powered by Google App Engine
This is Rietveld 408576698