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

Unified Diff: chrome/browser/ui/apps/chrome_app_window_delegate.cc

Issue 171593002: Rename ChromeShellWindowDelegate to ChromeAppWindowDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/apps/chrome_app_window_delegate.cc
diff --git a/chrome/browser/ui/apps/chrome_shell_window_delegate.cc b/chrome/browser/ui/apps/chrome_app_window_delegate.cc
similarity index 79%
rename from chrome/browser/ui/apps/chrome_shell_window_delegate.cc
rename to chrome/browser/ui/apps/chrome_app_window_delegate.cc
index ee201d2c526c62d1d201998fed80c1373515ae1e..690e989097a9c506ae4d94d1e4565cc9d40d8429 100644
--- a/chrome/browser/ui/apps/chrome_shell_window_delegate.cc
+++ b/chrome/browser/ui/apps/chrome_app_window_delegate.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/apps/chrome_shell_window_delegate.h"
+#include "chrome/browser/ui/apps/chrome_app_window_delegate.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/favicon/favicon_tab_helper.h"
@@ -98,13 +98,13 @@ class OpenURLFromTabBasedOnBrowserDefault
} // namespace
-ShellWindowLinkDelegate::ShellWindowLinkDelegate() {}
+AppWindowLinkDelegate::AppWindowLinkDelegate() {}
-ShellWindowLinkDelegate::~ShellWindowLinkDelegate() {}
+AppWindowLinkDelegate::~AppWindowLinkDelegate() {}
// TODO(rockot): Add a test that exercises this code. See
// http://crbug.com/254260.
-content::WebContents* ShellWindowLinkDelegate::OpenURLFromTab(
+content::WebContents* AppWindowLinkDelegate::OpenURLFromTab(
content::WebContents* source,
const content::OpenURLParams& params) {
if (source) {
@@ -121,15 +121,15 @@ content::WebContents* ShellWindowLinkDelegate::OpenURLFromTab(
return NULL;
}
-ChromeShellWindowDelegate::ChromeShellWindowDelegate() {}
+ChromeAppWindowDelegate::ChromeAppWindowDelegate() {}
-ChromeShellWindowDelegate::~ChromeShellWindowDelegate() {}
+ChromeAppWindowDelegate::~ChromeAppWindowDelegate() {}
-void ChromeShellWindowDelegate::DisableExternalOpenForTesting() {
+void ChromeAppWindowDelegate::DisableExternalOpenForTesting() {
disable_external_open_for_testing_ = true;
}
-void ChromeShellWindowDelegate::InitWebContents(
+void ChromeAppWindowDelegate::InitWebContents(
content::WebContents* web_contents) {
FaviconTabHelper::CreateForWebContents(web_contents);
@@ -143,30 +143,29 @@ void ChromeShellWindowDelegate::InitWebContents(
#endif // defined(ENABLE_PRINTING)
}
-apps::NativeAppWindow* ChromeShellWindowDelegate::CreateNativeAppWindow(
+apps::NativeAppWindow* ChromeAppWindowDelegate::CreateNativeAppWindow(
apps::AppWindow* window,
const apps::AppWindow::CreateParams& params) {
return CreateNativeAppWindowImpl(window, params);
}
-content::WebContents* ChromeShellWindowDelegate::OpenURLFromTab(
+content::WebContents* ChromeAppWindowDelegate::OpenURLFromTab(
content::BrowserContext* context,
content::WebContents* source,
const content::OpenURLParams& params) {
return OpenURLFromTabInternal(context, source, params);
}
-void ChromeShellWindowDelegate::AddNewContents(
- content::BrowserContext* context,
- content::WebContents* new_contents,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos,
- bool user_gesture,
- bool* was_blocked) {
+void ChromeAppWindowDelegate::AddNewContents(content::BrowserContext* context,
+ content::WebContents* new_contents,
+ WindowOpenDisposition disposition,
+ const gfx::Rect& initial_pos,
+ bool user_gesture,
+ bool* was_blocked) {
if (!disable_external_open_for_testing_) {
- if (!shell_window_link_delegate_.get())
- shell_window_link_delegate_.reset(new ShellWindowLinkDelegate());
- new_contents->SetDelegate(shell_window_link_delegate_.get());
+ if (!app_window_link_delegate_.get())
+ app_window_link_delegate_.reset(new AppWindowLinkDelegate());
+ new_contents->SetDelegate(app_window_link_delegate_.get());
return;
}
chrome::ScopedTabbedBrowserDisplayer displayer(
@@ -179,28 +178,28 @@ void ChromeShellWindowDelegate::AddNewContents(
initial_pos, user_gesture, was_blocked);
}
-content::ColorChooser* ChromeShellWindowDelegate::ShowColorChooser(
+content::ColorChooser* ChromeAppWindowDelegate::ShowColorChooser(
content::WebContents* web_contents,
SkColor initial_color) {
return chrome::ShowColorChooser(web_contents, initial_color);
}
-void ChromeShellWindowDelegate::RunFileChooser(
+void ChromeAppWindowDelegate::RunFileChooser(
content::WebContents* tab,
const content::FileChooserParams& params) {
FileSelectHelper::RunFileChooser(tab, params);
}
-void ChromeShellWindowDelegate::RequestMediaAccessPermission(
- content::WebContents* web_contents,
- const content::MediaStreamRequest& request,
- const content::MediaResponseCallback& callback,
- const extensions::Extension* extension) {
+void ChromeAppWindowDelegate::RequestMediaAccessPermission(
+ content::WebContents* web_contents,
+ const content::MediaStreamRequest& request,
+ const content::MediaResponseCallback& callback,
+ const extensions::Extension* extension) {
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
web_contents, request, callback, extension);
}
-int ChromeShellWindowDelegate::PreferredIconSize() {
+int ChromeAppWindowDelegate::PreferredIconSize() {
#if defined(USE_ASH)
return ash::kShelfPreferredSize;
#else
@@ -208,7 +207,7 @@ int ChromeShellWindowDelegate::PreferredIconSize() {
#endif
}
-void ChromeShellWindowDelegate::SetWebContentsBlocked(
+void ChromeAppWindowDelegate::SetWebContentsBlocked(
content::WebContents* web_contents,
bool blocked) {
// RenderViewHost may be NULL during shutdown.
@@ -219,7 +218,7 @@ void ChromeShellWindowDelegate::SetWebContentsBlocked(
}
}
-bool ChromeShellWindowDelegate::IsWebContentsVisible(
+bool ChromeAppWindowDelegate::IsWebContentsVisible(
content::WebContents* web_contents) {
return platform_util::IsVisible(web_contents->GetView()->GetNativeView());
}

Powered by Google App Engine
This is Rietveld 408576698