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

Side by Side Diff: chrome/browser/ui/views/location_bar/page_action_image_view.cc

Issue 103493005: Rename View::set_focusable and View::set_accessibility_focusable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a few missing files Created 7 years 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/views/location_bar/page_action_image_view.h" 5 #include "chrome/browser/ui/views/location_bar/page_action_image_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/extensions/api/commands/command_service.h" 8 #include "chrome/browser/extensions/api/commands/command_service.h"
9 #include "chrome/browser/extensions/extension_action.h" 9 #include "chrome/browser/extensions/extension_action.h"
10 #include "chrome/browser/extensions/extension_action_icon_factory.h" 10 #include "chrome/browser/extensions/extension_action_icon_factory.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 SessionID::IdForTab(owner->GetWebContents())), 47 SessionID::IdForTab(owner->GetWebContents())),
48 this) { 48 this) {
49 const Extension* extension = owner_->profile()->GetExtensionService()-> 49 const Extension* extension = owner_->profile()->GetExtensionService()->
50 GetExtensionById(page_action->extension_id(), false); 50 GetExtensionById(page_action->extension_id(), false);
51 DCHECK(extension); 51 DCHECK(extension);
52 52
53 icon_factory_.reset( 53 icon_factory_.reset(
54 new ExtensionActionIconFactory( 54 new ExtensionActionIconFactory(
55 owner_->profile(), extension, page_action, this)); 55 owner_->profile(), extension, page_action, this));
56 56
57 set_accessibility_focusable(true); 57 SetAccessibilityFocusable(true);
58 set_context_menu_controller(this); 58 set_context_menu_controller(this);
59 59
60 extensions::CommandService* command_service = 60 extensions::CommandService* command_service =
61 extensions::CommandService::Get(browser_->profile()); 61 extensions::CommandService::Get(browser_->profile());
62 extensions::Command page_action_command; 62 extensions::Command page_action_command;
63 if (command_service->GetPageActionCommand( 63 if (command_service->GetPageActionCommand(
64 extension->id(), 64 extension->id(),
65 extensions::CommandService::ACTIVE_ONLY, 65 extensions::CommandService::ACTIVE_ONLY,
66 &page_action_command, 66 &page_action_command,
67 NULL)) { 67 NULL)) {
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 popup_ = ExtensionPopup::ShowPopup(popup_url, browser_, this, arrow, 280 popup_ = ExtensionPopup::ShowPopup(popup_url, browser_, this, arrow,
281 show_action); 281 show_action);
282 popup_->GetWidget()->AddObserver(this); 282 popup_->GetWidget()->AddObserver(this);
283 } 283 }
284 284
285 void PageActionImageView::HidePopup() { 285 void PageActionImageView::HidePopup() {
286 if (popup_) 286 if (popup_)
287 popup_->GetWidget()->Close(); 287 popup_->GetWidget()->Close();
288 } 288 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698