| OLD | NEW | 
|---|
| 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 #import "chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h
     " | 5 #import "chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h
     " | 
| 6 | 6 | 
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" | 
| 8 #include "base/logging.h" | 8 #include "base/logging.h" | 
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" | 
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" | 
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 179       content::WebContents* web_contents, | 179       content::WebContents* web_contents, | 
| 180       ContentSettingBubbleController* controller) | 180       ContentSettingBubbleController* controller) | 
| 181       : content::WebContentsObserver(web_contents), | 181       : content::WebContentsObserver(web_contents), | 
| 182         controller_(controller) { | 182         controller_(controller) { | 
| 183   } | 183   } | 
| 184 | 184 | 
| 185  protected: | 185  protected: | 
| 186   // WebContentsObserver: | 186   // WebContentsObserver: | 
| 187   virtual void DidNavigateMainFrame( | 187   virtual void DidNavigateMainFrame( | 
| 188       const content::LoadCommittedDetails& details, | 188       const content::LoadCommittedDetails& details, | 
| 189       const content::FrameNavigateParams& params) OVERRIDE { | 189       const content::FrameNavigateParams& params) override { | 
| 190     // Content settings are based on the main frame, so if it switches then | 190     // Content settings are based on the main frame, so if it switches then | 
| 191     // close up shop. | 191     // close up shop. | 
| 192     [controller_ closeBubble:nil]; | 192     [controller_ closeBubble:nil]; | 
| 193   } | 193   } | 
| 194 | 194 | 
| 195  private: | 195  private: | 
| 196   ContentSettingBubbleController* controller_;  // weak | 196   ContentSettingBubbleController* controller_;  // weak | 
| 197 | 197 | 
| 198   DISALLOW_COPY_AND_ASSIGN(ContentSettingBubbleWebContentsObserverBridge); | 198   DISALLOW_COPY_AND_ASSIGN(ContentSettingBubbleWebContentsObserverBridge); | 
| 199 }; | 199 }; | 
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 818       button, base::SysUTF16ToNSString(it->second->model->GetLabelAt(index))); | 818       button, base::SysUTF16ToNSString(it->second->model->GetLabelAt(index))); | 
| 819 | 819 | 
| 820   it->second->model->ExecuteCommand(index, 0); | 820   it->second->model->ExecuteCommand(index, 0); | 
| 821 } | 821 } | 
| 822 | 822 | 
| 823 - (content_setting_bubble::MediaMenuPartsMap*)mediaMenus { | 823 - (content_setting_bubble::MediaMenuPartsMap*)mediaMenus { | 
| 824   return &mediaMenus_; | 824   return &mediaMenus_; | 
| 825 } | 825 } | 
| 826 | 826 | 
| 827 @end  // ContentSettingBubbleController | 827 @end  // ContentSettingBubbleController | 
| OLD | NEW | 
|---|